<template>
  <view>
    <view class="w100 pl-30 pr-30">
      <view class="w100 h-132 rowsb rowsm" style="border-bottom: 2rpx solid #eee;" @click="$tools.goNext('/pages/msg/toDoList')">
        <view class="rows rowsm">
          <image src="/static/icon_ddsx.png" class="w-80 h-80 mr-20" mode=""></image>
          <view class="rowscl">
            <view class="fs-30 col333 mb-4">待办事项</view>
            <view class="fs-24 col888">督促</view>
          </view>
        </view>
        <view class="rows rowsm">
          <view class="pl-10 pr-10 rowsc rowsm h-36 br-18 colfff mr-20" style="background: linear-gradient(to bottom,#FC876E,#F63B3C);" v-if="num1">{{num1}}</view>
          <image src="/static/icon_jt.png" class="w-28 h-28" mode=""></image>
        </view>
      </view>
      <view class="w100 h-132 rowsb rowsm" style="border-bottom: 2rpx solid #eee;" @click="$tools.goNext('/pages/msg/notice')">
        <view class="rows rowsm">
          <image src="/static/icon_tzgg.png" class="w-80 h-80 mr-20" mode=""></image>
          <view class="rowscl">
            <view class="fs-30 col333 mb-4">通知公告</view>
            <view class="fs-24 col888">通知公告</view>
          </view>
        </view>
        <view class="rows rowsm">
          <view class="pl-10 pr-10 rowsc rowsm h-36 br-18 colfff mr-20" style="background: linear-gradient(to bottom,#FC876E,#F63B3C);" v-if="num2">{{num2}}</view>
          <image src="/static/icon_jt.png" class="w-28 h-28" mode=""></image>
        </view>
      </view>
      <!-- <view class="w100 h-132 rowsb rowsm" style="border-bottom: 2rpx solid #eee;" @click="$tools.goNext('/pages/msg/notice?index=2')">
        <view class="rows rowsm">
          <image src="/static/icon_xtxx-1.png" class="w-80 h-80 mr-20" mode=""></image>
          <view class="rowscl">
            <view class="fs-30 col333 mb-4">系统消息</view>
            <view class="fs-24 col888">系统消息</view>
          </view>
        </view>
        <view class="rows rowsm">
          <view class="pl-10 pr-10 rowsc rowsm h-36 br-18 colfff mr-20" style="background: linear-gradient(to bottom,#FC876E,#F63B3C);" v-if="num3">{{num3}}</view>
          <image src="/static/icon_jt.png" class="w-28 h-28" mode=""></image>
        </view>
      </view> -->
      <view class="w100 h-132 rowsb rowsm" style="border-bottom: 2rpx solid #eee;" @click="$tools.goNext('/pages/msg/server')">
        <view class="rows rowsm">
          <image src="/static/icon_xpy-12.png" class="w-80 h-80 mr-20" mode=""></image>
          <view class="rowscl">
            <view class="fs-30 col333 mb-4">客服</view>
            <view class="fs-24 col888">客服热线</view>
          </view>
        </view>
        <view class="rows rowsm">
          <!-- <view class="pl-10 pr-10 rowsc rowsm h-36 br-18 colfff mr-20" style="background: linear-gradient(to bottom,#FC876E,#F63B3C);">1</view> -->
          <image src="/static/icon_jt.png" class="w-28 h-28" mode=""></image>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        num1:0,
        num2:0,
        num3:0,
      };
    },
    onLoad() {
      
    },
    onShow() {
      // this.getList()
    },
    methods:{
      getList(){
        this.$tools.axiosFromToken('POST','prouser/listMessage',{},'加载中').then(res => {
          if(res.code != 200) return this.$tools.showtt(res.msg)
          let {data} = res
          this.num1 = data.filter(item => item.name == '待办事项').count
          this.num2 = data.filter(item => item.name == '通知公告').count
          this.num3 = data.filter(item => item.name == '系统消息').count
        })
      }
    }
  }
</script>

<style lang="scss">

</style>
